home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6725 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  35 lines

  1. Newsgroups: comp.lang.c++
  2. Path: lyra.csx.cam.ac.uk!warwick!bsmail!talisker!nathan
  3. From: nathan@pact.srf.ac.uk (Nathan Sidwell)
  4. Subject: Re: What is NULL?
  5. Message-ID: <DMnxvo.D3n@uns.bris.ac.uk>
  6. Sender: usenet@uns.bris.ac.uk (Usenet news owner)
  7. Nntp-Posting-Host: talisker.pact.srf.ac.uk
  8. Organization: Inmos
  9. X-Newsreader: TIN [version 1.2 PL2]
  10. References: <311F918A.42AC@lls.se>
  11. Date: Mon, 12 Feb 1996 12:40:35 GMT
  12.  
  13. Mattias Wahlberg (matjo@lls.se) wrote:
  14. : Hi there,
  15.  
  16. : In ANSI-C NULL is defined as (void*) 0. In MSVC++ it is defined as 0.
  17.  
  18. : What is the definition of NULL in the forth-coming ANSI-C++?
  19.  
  20. Section 18.1 says
  21. 'The macro NULL is an implementation-defined C++ null-pointer constant'
  22. A footnote says,
  23. 'Possible definitions include 0 and 0L, but not (void *)0'
  24.  
  25. (void *)0 would cause problems, because C++ conversion from void is
  26. different than for ANSI C.(C++ requires a diagnostic)
  27.  
  28. nathan
  29.  
  30. --
  31. Nathan Sidwell                         Holder of the Xmris home page
  32. Chameleon Architecture Group at SGS-Thomson, formerly Inmos
  33. http://www.pact.srf.ac.uk/~nathan/                  Tel 0117 9707182
  34. nathan@inmos.co.uk or nathan@bristol.st.com or nathan@pact.srf.ac.uk
  35.